// run: $exec < input
#include <iostream>
#include <string>

std::string const s{"ROYGBIV"};
std::string ans(101, 'A');
int n;

bool check(int i, char ch)
{
	return !(ans[i] == ch || ans[(i + 1) % n] == ch ||
				ans[(i + 2) % n] == ch || ans[(i + 3) % n] == ch ||
					ans[(i - 1 + n) % n] == ch || ans[(i - 2 + n) % n] == ch ||
						ans[(i - 3 + n) % n] == ch);
}

int main()
{
	std::ios::sync_with_stdio(false);
	std::cin >> n;
	for (int i = 0; i < 7; i++) ans[i] = s[i];
	int j = 0;
	for (int i = 7; i < n; i++) {
		while (!check(i, s[j])) j = (j + 1) % 7;
		ans[i] = s[j];
	}
	for (int i = 0; i < n; i++) std::cout << ans[i];
}

